<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  错误上报开源
  <button onclick="toggleError()">点击触发报错</button>
  <button onclick="togglehandle()">点击触发手动上报</button>

  <script>
    function toggleError() {
      try {
        console.log(a.b) // TODO: 1.运行时错误
      }catch(e) {
        console.dir(e)
        throw e
      }
    }
    function togglehandle() {
      window.__ml.error && window.__ml.error(new Error('123'));
    }
  </script>
  <script> !(function (c, b, d, a) { c[a] || (c[a] = {}); c[a].config = { userId: '',appKey: '5ea50b485b0dd76c634b9cf7', imgUrl: 'https://backsite.hubing.online/Up?',disableHook:false, disableJS:false,disableResource:true }; var dom = document.createElement("script"); dom.setAttribute("crossorigin", "anonymous"); dom.setAttribute("src", d); document.body.insertBefore(dom, document.body.firstChild); })(window, document, 'https://hubing.online/bundle.js', "__ml"); </script>

</body>
</html>